<%@page import="hyl.core.db.*,com.servlet.My,hyl.core.info.Content,hyl.core.MyFun"%><%@ page language="java" contentType="application/json;charset=UTF-8"
    pageEncoding="UTF-8"%><%

    Content ct = new Content();
////////////////////////////////dao//////////////////////////////////
	MySqlSelect count = MySqlSelect.getInstance("select count(1) as total from sys_rolemanage a where a.id>0 ");
	String sql = "select a.id,(select count(*) from user b where (b.roleid&a.id)=a.id and (b.istate&a.id)=a.id) cnt ,a.rolename,a.manage from sys_rolemanage a where a.id>0";
	MySqlSelect2 select = MySqlSelect2.getInstance(sql);
	ct.setCode(1, "查询成功");
	ct.iniBodys(count.getMap());
	ct.addBodyItem("_rs", select.getList2D());
	out.print(ct.toJsonString());
	
%>